using System;
using System.Collections.Generic;
using System.Text;

namespace TestImport
{
    class MijnLib
    {
        public static string zetDecimalenOp2(string getal)
        {
            string[] hulp = getal.Split(',');
            if (hulp.Length == 1) return getal + ",00";
            if (hulp.Length == 2)
            {
                if (hulp[1].Length < 2) return getal + "0";
                else return hulp[0] + "," + hulp[1].Substring(0, 2);
            }
            return getal;
        }

        public static string Verticaal(String tekst)
        {
            string terug = "";
            for (int i = 0; i < tekst.Length; i++)
                terug += tekst.Substring(i, 1) + Environment.NewLine;
            return terug;
        }

        public static string VerticaalDubbel(String tekst,int max)
        {
            string terug = "";
            if (tekst.Length <= max)
            {
                for (int i = 0; i < tekst.Length - 1; i++)
                    terug += tekst.Substring(i, 1) + Environment.NewLine;
            }
            else
            {
                for (int i = 0; i < (tekst.Length/2) - 1; i+=2)
                    terug += tekst.Substring(i, 1) +" "+tekst.Substring(i+1, 1) + Environment.NewLine;
            }
            return terug;
        }
    }
}
